package com.example.common.network;


import com.example.common.model.Description;
import com.example.common.model.MyResponse;
import com.example.common.model.RsaApiCreateResp;
import com.example.common.model.UserApiGetUserFavorResp;
import com.example.common.model.UserApiModifyInformationResp;

import java.net.ResponseCache;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.HEAD;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;

public interface UserReq {

    @GET("user")
    Call<MyResponse<Description>> getUser(@Header("authorization") String authorization);

    @FormUrlEncoded
    @PUT("user")
    Call<MyResponse<UserApiModifyInformationResp>> putUser(@Header("authorization") String authorization,
                                                           @Field("avatar") String avatar,
                                                           @Field("birthday") String birthday,
                                                           @Field("gender") Integer gender,
                                                           @Field("introduction") String introduction,
                                                           @Field("username") String username);

    @GET("user/{id}/favor")
    Call<MyResponse<UserApiGetUserFavorResp>> getUserIdFavor(@Path("id") Integer id);

}
